Skip to content

Conversation

@shargon
Copy link

@shargon shargon commented Jun 28, 2024

@Jim8y I removed the new warnings created by neo-project#3364 , but I found a bug, sortedPool in line 407 can be null because line 259


return GetLowestFeeTransaction(out _, out _).CompareTo(tx) <= 0;
var item = GetLowestFeeTransaction(out _, out _);
if (item == null) return false;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can fail if it's null

{
PoolItem minItem = GetLowestFeeTransaction(out var unsortedPool, out var sortedPool);
var minItem = GetLowestFeeTransaction(out var unsortedPool, out var sortedPool);
if (minItem == null || sortedPool == null) break;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can fail if it's null, because lime 259 and 262

@shargon shargon changed the title null checks for #3334 null checks for #3334 and fix some bugs Jun 28, 2024
@shargon shargon changed the title null checks for #3334 and fix some bugs null checks for #3364 and fix some bugs Jun 28, 2024
@Jim8y
Copy link
Owner

Jim8y commented Jun 28, 2024

this should be your pr on master, please do it on master directly

@Jim8y Jim8y changed the base branch from fix-2862 to master June 28, 2024 16:20
@Jim8y Jim8y changed the base branch from master to fix-2862 June 28, 2024 16:20
@shargon shargon closed this Jun 28, 2024
@shargon shargon deleted the 2862-remove-null branch June 28, 2024 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants